- /* smanager.cpp by K.Tsuru */
- /*****************************
- SNManager class
- ******************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- //the maximum integral value which can be expressed by double = 1.0e15
- const double INT_MAX_DBL = dpow10(DOUBLE_FIG);
-
- /*
- the pointer to the memory free function
- */
- // SNStack <void (*)()> SNManager::MemFreeFunc; // deleted since 2.30
-
- // Creation and initilization of static objects.
- #ifdef NDEBUG
- bool SNManager::verify = OFF; //verify or not in the division routine, etc
- bool SNManager::fftVerify = OFF;// verify or not in the rounding off FFT multiplication
- bool SNManager::showMessage = OFF; // Show a message "Evaluating Pi() now." or not.
- #else
- bool SNManager::verify = ON;
- bool SNManager::fftVerify = ON;
- bool SNManager::showMessage = ON;
- #endif
- SNManager::SNErrorFlag SNManager::errorFlag = (SNManager::SNErrorFlag)NO_ERR;
- char* SNManager::place = NULL;
- long SNManager::objectCounter = -1;
- FILE* SNManager::stream = stdout;
- ostream& SNManager::sn_ost = cout; // std::output stream. default is "std::cout".
-
- // FFT
- uint SNManager::fftArraySize = 0;
- uint SNManager::fftMinSize = defaultFFTMinSize;
- bool SNManager::fftUse = ON;
- long SNManager::fftUsedTimes = 0;
- long SNManager::KaratsubaHHMultUsedTimes = 0;
-
- bool SNManager::preferSpeed = false;
-
- void SNManager::ShowMessage(const char* msg){
- if(showMessage) cerr << msg; // version 2.20
- }
- //It is called by the error of new operator.
- void OutOfMemory(){
- cerr << "\nSN library : Sorry, out of memory!" << endl; exit(EXIT_FAILURE); // version 2.20
- }
-
- // function ID = 009
- /*
- destructor
- */
- SNManager::~SNManager(){
- delete[] place; place = NULL;
- // CloseFile(); // Do not ececute
- // cerr << "objectCounter = " << objectCounter << endl;
- }
smanager.cpp : last modifiled at 2017/08/22 16:31:36(1,816 bytes)
created at 2016/04/11 11:36:47
The creation time of this html file is 2017/10/27 10:59:17 (Fri Oct 27 10:59:17 2017).